home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2001 May / SGI Freeware 2001 May - Disc 2.iso / dist / fw_libxml.idb / usr / freeware / bin / xml-config.z / xml-config
Text File  |  2001-04-12  |  998b  |  73 lines

  1. #! /bin/sh
  2.  
  3. prefix=${ROOT}/usr/freeware
  4. exec_prefix=${prefix}
  5. includedir=${prefix}/include
  6. libdir=${ROOT}/usr/freeware/${ABILIB-lib32}
  7.  
  8. usage()
  9. {
  10.     cat <<EOF
  11. Usage: xml-config [OPTION]
  12.  
  13. Known values for OPTION are:
  14.  
  15.   --prefix=DIR        change libxml prefix [default $prefix]
  16.   --libs        print library linking information
  17.   --cflags        print pre-processor and compiler flags
  18.   --help        display this help and exit
  19.   --version        output version information
  20. EOF
  21.  
  22.     exit $1
  23. }
  24.  
  25. if test $# -eq 0; then
  26.     usage 1
  27. fi
  28.  
  29. cflags=false
  30. libs=false
  31.  
  32. while test $# -gt 0; do
  33.     case "$1" in
  34.     -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  35.     *) optarg= ;;
  36.     esac
  37.  
  38.     case "$1" in
  39.     --prefix=*)
  40.     prefix=$optarg
  41.     ;;
  42.  
  43.     --prefix)
  44.     echo $prefix
  45.     ;;
  46.  
  47.     --version)
  48.     echo 1.8.11
  49.     exit 0
  50.     ;;
  51.  
  52.     --help)
  53.     usage 0
  54.     ;;
  55.  
  56.     --cflags)
  57.            echo -I${includedir}/gnome-xml 
  58.            ;;
  59.  
  60.     --libs)
  61.            echo -L${libdir} -lxml -lz   
  62.            ;;
  63.  
  64.     *)
  65.     usage
  66.     exit 1
  67.     ;;
  68.     esac
  69.     shift
  70. done
  71.  
  72. exit 0
  73.